#ifdef HAVE_CONFIG_H
#  include <config.h>
#endif

#include <gtk/gtk.h>

#include "callbacks.h"
#include "interface.h"
#include "support.h"

#include <stdlib.h>
#include <string.h>
#include "personne.h"
void
on_button1_clicked                     (GtkWidget       *objet_grafique,
                                        gpointer         user_data)
{
 Personne P;
 char chemin[]=("personnes.txt","w");

GtkWidget  *entry1;
GtkWidget  *entry2;
GtkWidget  *entry3;

entry1 = lookup_widget(objet_grafique, "entry1");
entry2 = lookup_widget(objet_grafique, "entry2");
entry3 = lookup_widget(objet_grafique, "entry3");

strcpy(P.nom, gtk_entry_get_text(GTK_ENTRY(entry1)));
strcpy(P.prenom, gtk_entry_get_text(GTK_ENTRY(entry2)));
P.age=atoi (gtk_entry_get_text(GTK_ENTRY(entry3)));

enregistrer_personne(chemin,P);

}


void on_button2_clicked (GtkWidget  *objet_grafique, gpointer  user_data)
{
 Personne P;
 char chemin[] = "personnes.txt";

 char Buf0[50] = "NOM: ";
 char Buf1[50] = "PRENOM: ";
 char Buf2[50] = "AGE: ";

 GtkWidget * label6;
 
 label6= lookup_widget(objet_grafique, "label6");

 lire_personne(chemin, &P);
 sprintf(Buf0, "%s %s \n\n %s %s \n\n %s %d \n\n", Buf0, P.nom, Buf1, P.prenom, Buf2, P.age);

gtk_label_set_text(GTK_LABEL(label6), Buf0);
 

}


void on_button3_clicked (GtkButton *button, gpointer user_data)
{

}


void on_button4_clicked (GtkWidget *objet_grafique, gpointer user_data)
{
GtkWidget *window5;
window5 = create_window5();
gtk_widget_show(window5);
}


void
on_button8_clicked                     (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button5_clicked                     (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button6_clicked                     (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button7_clicked                     (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button9_clicked                     (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button10_clicked                    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button11_clicked                    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button15_clicked                    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button12_clicked                    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button13_clicked                    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button14_clicked                    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button16_clicked                    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button24_clicked                    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button22_clicked                    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button21_clicked                    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button23_clicked                    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button17_clicked                    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button18_clicked                    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button19_clicked                    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button20_clicked                    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button26_clicked                    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button25_clicked                    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button28_clicked                    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button29_clicked                    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button30_clicked                    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button31_clicked                    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button33_clicked                    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button32_clicked                    (GtkButton       *button,
                                        gpointer         user_data)
{

}

